package org.example.trigger.rpc;

import org.apache.dubbo.config.annotation.DubboService;
import org.example.api.IUserRaffleApiService;
import org.example.api.model.dto.RafflePrizeDTO;
import org.example.api.model.response.Response;
import org.example.types.common.ResponseCode;

/**
 * @author lxc18
 * @date 2025/4/9 20:41
 * @description UserRaffleRPCService
 */
@DubboService(version = "1.0.0")
public class UserRaffleRPCService implements IUserRaffleApiService {
    @Override
    public Response<RafflePrizeDTO> doRaffle(Long userId, Long activityId) {
        //无实际业务逻辑，仅用于测试
        return Response.<RafflePrizeDTO>builder()
                .code(ResponseCode.USER_RAFFLE_ACTIVITY_INVALID.getCode())
                .info(ResponseCode.USER_RAFFLE_ACTIVITY_INVALID.getInfo())
                .data(null)
                .build();
    }
}
